|
ioPosOffset
for Devices
Technote FL 24 |
June 1998 |
_Read
and
_Write
calls for devices. It also says that "After the
transfer is completed, the ioPosOffset
field indicates
the current position of the block device." Actually,
ioPosOffset is not changed by _Read
and
_Write
calls to device drivers.
On the other hand, if the _Read
or
_Write
call is made to a file (ioRefNum
is
a file reference number), ioPosOffset
is updated to the
reflect the mark for that file reference number after the call. This
is correctly documented in
Inside
Macintosh: Files (and Inside Macintosh Volume II
page 110, and Inside Macintosh Volume IV page 140).
Note also that device drivers should only look at the
dCtlPosition field of the DCE, and should not look directly
at the ioPosOffset field of the parameter block. The Device
Manager sets up dCtlPosition for the driver, taking into
account both the ioPosMode and the ioPosOffset.
Technotes
Previous Technote |
Contents | Next
Technote